<?php
require_once 'Kanedo/Controller/Abstract.php';

class editController extends Kanedo_Controller_Abstract 
{
	public function siteAction()
	{
		$tree = Kanedo_Registry::getInstance()->tree;
		$this->_view->tree = $tree->getHTMLTree();
		require_once 'SiteEdit.php';
		$site = new SiteEdit(Kanedo_Registry::getInstance()->db);
		#$site->createChildSite("test", "test", time(), 1, 1, 1);
		$id = $this->_request->getGetParam('id');
		if ($id)
		{
			try {
				echo "<pre>";
				var_dump($site->getSiteById($id));
				echo "</pre>";
			}catch(Kanedo_Db_Exception $e)
			{
				$this->_view->error = $e->getMessage();
			}
			
		}else {
			
		}
		
	}
}
?>